package com.authstr.model.jsf;

import com.authstr.model.base.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;


@Data
@TableName(value = "jsf_member_info")
public class JsfMemberInfo extends BaseModel {

	//姓名
	@NotEmpty(message = "会员名称不能为空")
	private String name;

	//会员卡号
	@NotEmpty(message = "会员卡号不能为空")
	private String card_number;

	//会员类型	1普通会员 2年卡会员 3终身会员
	@NotNull(message = "会员类型不能为空")
	private Integer type;

	//性别 字典code SEX
	@NotNull(message = "性别不能为空")
	private Long sex_id;

	//会员到期时间
	@DateTimeFormat(pattern="yyyy-MM-dd mm:hh:ss")
	@JsonFormat(pattern="yyyy-MM-dd mm:hh:ss",timezone="GMT+8")
	private Date expiration_time;

	//余额
	private BigDecimal balance;

	//手机号
	private String phone;

	//积分
	private Integer integral;

	//体测信息
	private String remark;

	//家庭住址
	private String addr;

	//私教次数
	private Integer personal_trainer_num;

	//出生日期
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
	private Date birthdate;

	//用户id
	private Long user_id;

	//状态
	private Integer status;
}
